<template>
    <div class="easyd-weixin-Box">
        <div class="app_page">
            <div class="communication_list app_box_content_list app_list_box" v-for="item in userData" @click="selectConfirm(item)">
                <div class="communication_info"  >
                    <div class="app_box_flex">
                        <div class="app_box_content_left">
                            {{item.u_nickname}}
                        </div>
                        <div class="app_box_content_left C4">
                            {{item.u_phone}}
                        </div>
                        <div class="app_box_content_left" style="text-align: right;padding-right: 10px;color:#04c7ff">
                            正常
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</template>

<script>
    import {mapState, mapMutations} from "vuex";

    export default {

        data() {
            return {};
        },
        computed: {
            ...mapState({
                userData: state => state.SelectSaleModule.userData,
            }),
        },
        mounted() {

            this.initData()

        },
        methods: {
            //  ...mapMutations(["ShopIndexModule/updateIsShopGuide"]),

            initData() {
                var aipUrl = this.$API.salesList + "/u_id/" + this.$userData.getUID();

                this.$easyUtil.startLoading(this);
                this.$http.getHttp(
                    aipUrl,
                    rs => {
                        console.log(rs);
                        this.$store.commit("SelectSaleModule/updateUserData", rs.userList);
                        this.$easyUtil.endLoading(this)

                    }
                );
            },
            selectConfirm(item){
                console.log(item.u_nickname);
                console.log(item.u_id);
                
				this.$store.commit("HomeModule/updateSellData", item);
				history.go(-1);
            }
        }
    };
</script>

<style lang="stylus" scoped>
    @import '~PUBLIC_CSS';
    .app_box_flex {
        display flex
    }

    .app_box_flex div {
        flex 1
    }
</style>